//
//  ZWTextLabel.m
//  WanEr
//
//  Created by 高文萍 on 15/12/18.
//  Copyright © 2015年 高文萍. All rights reserved.
//

#import "ZWTextLabel.h"

@implementation  NSString (Calculate)


- (CGSize)sizeWithFont:(UIFont *)font maxSize:(CGSize)maxSize
{
    NSDictionary *dict = @{NSFontAttributeName:font};
    CGSize textSize = [self boundingRectWithSize:maxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:dict context:nil].size;
    
    return textSize;
}

@end
